<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title></title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link href="css/background.css" rel="stylesheet" type="text/css" />
		<link href="css/table.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
		<script type="text/javascript" src="js/table.js"></script>
		<script type="text/javascript" src="js/openwindow.js"></script>
		<script src="js/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
	</head>
	<script type="text/javascript">
	function manageForms(id,flowId){
		var currentPage=$("#currentPage").val();
		var url="getWorkFlowSign.action?tableId="+id+"&flowId="+flowId+"&currentPage="+currentPage;
		openWindow(url,700,500);
	}
	
	function manageForm(id,flowId){
		var currentPage=$("#currentPage").val();
		var url="workFlowFormBack.action?tableId="+id+"&flowId="+flowId+"&currentPage="+currentPage;
		openWindow(url,700,500);
	}
	function page(currentPage){
		$("#page").val(currentPage);
		document.pageForm.submit();
	}
	
	function clears(){
		$("#name").val("");
		$("#startTime1").val("");
		$("#startTime2").val("");
		document.seekFrom.submit();
	}
	
	function deleteWorkFlow(flowId,tableId){
	var param={"flowId":flowId,"tableId":tableId};
	if(confirm("确定要删除？")){
		$.post("deleteWorkFlowData.action",param,function(data){
			if(data=="success"){
				alert("删除数据成功！");
				var currentPage=$("#currentPage").val();
				page(currentPage);
			}else{
				alert("删除数据失败！");
			}
		});
	}
}
	</script>
<body>

	<div class="topdiv">
		<form action="rejectWorkFlowTaskFile.action" name="seekFrom" method="post">
			<div>
				标题：
				<s:select list="flowList" listKey="id" listValue="name" headerKey="" headerValue="--全部--" name="name" value="name" theme="simple"></s:select>
				&nbsp;
					开始时间：<input name="startDate"
						value="${startDate }" style="width: 120px;" class="Wdate" id="startTime1" type="text"
						readonly="readonly"
						onclick="WdatePicker({maxDate:'#F{$dp.$D(\'startTime2\',{d:-0});}'})"
						id="startTime1" />
					 &nbsp;结束时间：
					<input  name="endDate" style="width: 120px;" value="${endDate}"
						class="Wdate" id="startTime2" type="text" readonly="readonly"
						onclick="WdatePicker({minDate:'#F{$dp.$D(\'startTime1\',{d:0});}'})"
						id="startTime2" />
			</div>
			<table align="right">
					<tr>
						<td>
							<input type="submit" value="立即查找" class="button_04" />
							<input type="button" onclick="clears();" value="清除"
								class="button_02" />
						</td>
					</tr>
				</table>
		</form>
	</div>
	<table  border="0" cellpadding="0" cellspacing="0" width="100%">
		<tbody>
			<tr>
				<td style="background: url('image/wsoa_window_002.gif');" width="1"></td>
				<td style="background: url('image/wsoa_window_002.gif');">
					<table border="0" cellpadding="0" cellspacing="0">
						<tbody>
							<tr>
								<td align="center"
									style="background: url('image/wsoa_window_002.gif');"
									width="10">
									<img src="image/center_19.gif">
								</td>
								<td align="center"
									style="background: url('image/wsoa_window_002.gif');"></td>
								<td>
									工作流程&gt; 办理查阅 &gt; 已返回流程
								</td>
							</tr>
						</tbody>
					</table>
				</td>
				<td style="background: url('image/wsoa_window_002.gif');" width="1"></td>
			</tr>
			<tr>
				<td style="background: url('image/wsoa_window_010.gif');" width="1">
					&nbsp;
				</td>
				<td>
					<table class="intable">
				<tr>
				<td>&nbsp;</td>
				</tr>
				</table>
					<table   id="tabllist" class="righ_list" frame="box" cellspacing="1" cellpadding="0" width="100%" border="0">
						<tbody>
							<tr class="reigh_list2">
								<th width="23%">
									报送单位
								</th>
								<th width="8%">
									报送时间
								</th>
								<th>
									标题
								</th>
								<th width="8%">
									呈送人
								</th>
								<th width="10%">
									文件类型
								</th>
								<th width="15%">
									返回信息
								</th>
								<th width="8%">
									操作
								</th>
							</tr>
							<c:if test="${empty FielAll}">
								<tr id="row">
									<td colspan="8">
										没有相关的记录！
									</td>
								</tr>
							</c:if>
							<c:forEach items="${fielAll}" var="fiel">
							<tr id="row" onmouseover="overStyle(this)" onmouseout="outStyle(this)">
								<td>
								${fiel.unit }
								</td>
								<td>
								${fiel.time }
								</td>
								<td>
								${fiel.title }
								</td>
								<td>
								${fiel.sender }
								</td>
								<td>
								${fiel.flow}
								</td>
								<td>
								${fiel.reject}
								</td>
								<td align="center">
									<c:choose>
										<c:when test="${fiel.endTime==1}">
											<a href="javascript:manageForm('${fiel.id}','${fiel.fielTyoe}')">处理</a>
									        <a href="javascript:deleteWorkFlow('${fiel.fielTyoe}','${fiel.id}')"><img alt="删除" src="image/operate_delete.gif" border="0"/></a>
										</c:when>
									<c:otherwise>
											<a href="javascript:manageForms('${fiel.id}','${fiel.fielTyoe}')">处理</a>
									</c:otherwise>
									</c:choose>
									
								</td>
							</tr>
							</c:forEach>
						</tbody>
					</table>
				</td>
				<td style="background: url('image/wsoa_window_006.gif');" width="1">
					&nbsp;
				</td>
			</tr>
			<tr>
				<td height="1" width="1">
					<img src="image/wsoa_window_009.gif" height="16" width="14">
				</td>
				<td style="background: url('image/wsoa_window_008.gif');"
					height="1"></td>
				<td height="1" width="1">
					<img src="image/wsoa_window_007.gif" height="16" width="12">
				</td>
			</tr>
		</tbody>
	</table>
	<div class="pageDiv">
		<form action="rejectWorkFlowTaskFile.action" name="pageForm" method="post">
			<input type="hidden" name="name" id="name" value="${name}" />
			<input type="hidden" name="startDate" value="${startDate}" />
				<input type="hidden" name="endDate" value="${endDate}" />
			<input type="hidden" id="page" name="currentPage" />
			<%@include file="../../page/page.jsp"%>
		</form>
	</div>
</body>
</html>
